package com.descartes.mymedia.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.descartes.mymedia.model.Profil;

@Controller
public class Deconnexion {

	@RequestMapping(value="/deconnexion", method=RequestMethod.GET)
	public ModelAndView get(){
		ModelAndView modelAndView = new ModelAndView();
		modelAndView.addObject("profil", new Profil());
		modelAndView.setViewName("viewProfil");
		return modelAndView;
	}

	@RequestMapping(value="/deconnexion", method=RequestMethod.POST)
	public String post(Profil p) throws Exception{
		return "redirect:index.html";
	}
}
